package cn.enited.devtools.apiaggregator.converter;

import cn.enited.devtools.apiaggregator.dto.ApiAggObjectDto;
import cn.enited.devtools.apiaggregator.entity.ApiAggObject;
import org.mapstruct.Mapper;
import org.mapstruct.Mappings;

import java.util.List;

@Mapper(componentModel = "spring")
public interface ApiAggObjectConverter extends EntityConverter {

    @Mappings({})
    ApiAggObject.Entry dtoEntry2EntityEntry(ApiAggObjectDto.Entry dtoEntry);

    @Mappings({})
    ApiAggObjectDto.Entry entityEntry2DtoEntry(ApiAggObject.Entry entityEntry);

    @Mappings({})
    ApiAggObject dto2Entity(ApiAggObjectDto dto);

    List<ApiAggObject> dtoList2Entities(List<ApiAggObjectDto> dtoList);

    @Mappings({})
    ApiAggObjectDto entity2Dto(ApiAggObject entity);

    List<ApiAggObjectDto> entities2DtoList(List<ApiAggObject> entities);
}
